package com.cetc39.service.impl;

import java.util.List;

import com.cetc39.bean.Department;
import com.cetc39.dao.DeptDao;
import com.cetc39.service.DeptService;

public class DeptServiceImpl implements DeptService {

	private DeptDao deptDao;
	
	@Override
	public void addDept(Department dept) {
		deptDao.saveDept(dept);
	}

	@Override
	public void updateDept(Department dept) {
		deptDao.updateDept(dept);
	}

	@Override
	public List<?> findAllDept() {
		return deptDao.findAllDept();
	}

	public void setDeptDao(DeptDao deptDao) {
		this.deptDao = deptDao;
	}

	@Override
	public Department findById(int id) {
		return deptDao.findByDeptid(id);
	}

}
